// 引用网络请求中间件
import request from '../../utils/request.js';

/* 桶子 */
export function errorListAssist(data) {
	let {
		beginTime,
		endTime,
		pageNum,
		pageSize
	} = data
	if (beginTime) {
		return request({
			url: `/api/landscape/alarm/selectUserOwnAlarmList?beginTime=${beginTime}&endTime=${endTime}&pageNum=${pageNum}&pageSize=${pageSize}`,
			method: 'GET',
		})
	} else {
		return request({
			url: `/api/landscape/alarm/selectUserOwnAlarmList?pageNum=${pageNum}&pageSize=${pageSize}`,
			method: 'GET',
		})
	}
}
export function ListAssist(data) {
	return request({
		url: `/api/landscape/alarm/getLandscapeAlarmNowList`,
		method: 'GET',
		data
	})
}
export function dealErrorAssist(id) {
	return request({
		url: `/api/landscape/alarm/dealUserOwnAlarm/${id}`,
		method: 'POST',
	})
}

export function detailAssist(id) {
	return request({
		url: `/api/landscape/alarm/${id}`,
		method: 'GET',
	})
}